// import 'app_configure.dart';

import '../app_configure.dart';

class AppIntl {
  static Map<String, String> mapcn = {
    'a_seiral': 'assets/seires_a_bg.png',
    'r_seiral': 'assets/seires_r_bg.png',
    'm_seiral': 'assets/seires_m_bg.png',
    'b_seiral': 'assets/seires_b_bg.png',
    's_seiral': 'assets/seires_s_bg.png',
    'd_seiral': 'assets/seires_d_bg.png',
    'c_seiral': 'assets/seires_bg.png',
    'e_seiral': 'assets/seires_bg.png',
    'f_seiral': 'assets/seires_bg.png',
    'k_seiral': 'assets/seires_bg.png',
    'l_seiral': 'assets/seires_l_bg.png',
    'mp_seiral': 'assets/seires_bg.png',
    'program': 'assets/program_zh.png',
    'remote': 'assets/remote_zh.png',
    'introduce': 'assets/instruct_zh.png',
    'gravity': 'assets/light_zh.png',
    'languangImage': 'assets/state_ch.png',
    'program_txt': '编程',
    'remote_txt': '遥控',
    'introduce_txt': '说明书',
    'bluetoot_connect': '蓝牙连接中',
    'baidu_asr_pid': '1537',
    'voice_command_1': '前进',
    'voice_command_2': '后退',
    'voice_command_3': '向左转',
    'voice_command_4': '向右转',
    'voice_command_5': '停止',
    'module': '模块',
    'component_1': '前进后退',
    'component_2': '左转右转',
    'component_3': '电机常转(三个档位)',
    'component_4': '八个方向转动',
    'component_5': '前进后退',
    'component_6': '电机常转(三个档位)',
    'component_7': '左转右转',
    'camera': '拍照',
    'photos': '相册',
    'tips': '提示',
    'delete': '删除',
    'cancel': '取消',
    'delete_message': '您确定要删除当前文件吗',
    'entry_setup': '搭积木',
    'control_control': '动力组',
    'a_seiral_title': 'A系列',
    'r_seiral_title': 'R系列',
    'm_seiral_title': 'M系列',
    'b_seiral_title': 'B系列',
    's_seiral_title': 'S系列',
    'd_seiral_title': 'D系列',
    'l_seiral_title': 'L系列',
    'c_seiral_title': 'C系列',
  };
  static Map<String, String> mapen = {
    'a_seiral': 'assets/seires_a_bg.png',
    'r_seiral': 'assets/seires_r_bg.png',
    'm_seiral': 'assets/seires_m_bg.png',
    'b_seiral': 'assets/seires_b_bg.png',
    's_seiral': 'assets/seires_s_bg.png',
    'c_seiral': 'assets/seires_bg.png',
    'd_seiral': 'assets/seires_d_bg.png',
    'e_seiral': 'assets/seires_bg.png',
    'f_seiral': 'assets/seires_bg.png',
    'k_seiral': 'assets/seires_bg.png',
    'l_seiral': 'assets/seires_l_bg.png',
    'mp_seiral': 'assets/seires_bg.png',
    'program': 'assets/program_zh.png',
    'remote': 'assets/remote_zh.png',
    'introduce': 'assets/instruct_zh.png',
    'gravity': 'assets/light_en.png',
    'languangImage': 'assets/state_en.png',
    'program_txt': 'Program',
    'remote_txt': 'Remote',
    'introduce_txt': 'Instruct',
    'bluetoot_connect': 'bluetooth connecting',
    'baidu_asr_pid': '1737',
    'voice_command_1': 'go ahead',
    'voice_command_2': 'back',
    'voice_command_3': 'turn left',
    'voice_command_4': 'turn right',
    'voice_command_5': 'stop',
    'module': 'Module',
    'component_1': 'Forward and Backward',
    'component_2': 'Turn right and Turn left',
    'component_3': 'Runing kept (3 Level)',
    'component_4': 'Runing around',
    'component_5': 'Forward and Backward',
    'component_6': 'Runing kept (3 Level)',
    'component_7': 'Turn right and Turn left',
    'camera': 'Camera',
    'photos': 'Photos',
    'tips': 'Tips',
    'delete': 'Delete',
    'cancel': 'Cancel',
    'delete_message': 'Are you sure to delete this file?',
    'entry_setup': 'Setup',
    'control_control': 'Control',
    'a_seiral_title': 'A Module',
    'r_seiral_title': 'R Module',
    'm_seiral_title': 'M Module',
    'b_seiral_title': 'B Module',
    's_seiral_title': 'S Module',
    'd_seiral_title': 'D Module',
    'l_seiral_title': 'L Module',
    'c_seiral_title': 'C Module',
  };

  static AppConfig? appConfig;

  static void init({required config}) {
    appConfig = config;
  }

  static String getString(String key) {
    if (appConfig != null && appConfig!.language == 'en') {
      return mapen[key] as String;
    } else {
      return mapcn[key] as String;
    }
  }
}
